// 请求工具类
import axios from 'axios'
declare module 'axios' {
    interface AxiosResponse<T = any> {
        code: null,
        total: null,
        // 这里追加你的参数
    }
    export function create(config?: AxiosRequestConfig): AxiosInstance;
}
const serve = axios.create({
    baseURL: 'http://localhost:8080',
    timeout: 5000,
})
serve.interceptors.request.use((config: any) => {
    return config
}, (error: any) => Promise.reject(error))
serve.interceptors.response.use((res: any) => {
    return res.data
}, (error: any) => Promise.reject(error))
export default serve